#require 'rubygems'
require "rack"
require 'time'

autoload(:RedGreenRefactoring, File.dirname(__FILE__)+'/test/red_green_refactoring')

  # forward support of ruby 1.9 feature
  
  unless Object.instance_methods.include?('tap')
    class Object
      def tap
        yield self
        self
      end

      def with(&block)
        raise 'Gimme a block, would ya?' unless block_given?
        instance_eval(&block)
        self
      end
    end
  end


module DrunkenMaster

  unless Object.const_defined?("Loader")

    root = File.dirname(__FILE__)
    require root+"/loader/loader"
    include Loader

    Load.set_root(root)
    Load.blacklist.add(/test\.rb$/)
    Load.blacklist.add(/^_/)
    Load.load_dir('/lib')
    Load.load_dir('/magic')
    
  end
end